package com.iwomy.secureplat.platform.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.iwomy.secureplat.common.core.util.R;
import com.iwomy.secureplat.platform.dto.BasicExpensesDeviceDTO;
import com.iwomy.secureplat.platform.dto.BasicExpensesDviceConfigDTO;
import com.iwomy.secureplat.platform.entity.BasicDeviceEntity;
import com.iwomy.secureplat.platform.entity.BasicExpensesDviceConfigEntity;
import com.iwomy.secureplat.platform.entity.BasicNotificationRecordEntity;
import com.iwomy.secureplat.platform.vo.BasicExpensesDviceConfigVO;
import com.iwomy.secureplat.platform.vo.BasicInventoryListVO;
import java.util.List;

public interface BasicExpensesDviceConfigService extends IService<BasicExpensesDviceConfigEntity> {

	Page<BasicInventoryListVO> getBasicInventoryListPage(Page page, BasicExpensesDeviceDTO basicExpensesDeviceDTO);

	List<BasicExpensesDviceConfigVO> getDeliveryList(Long deviceId);

	R newlyAddedBatch(BasicExpensesDviceConfigDTO basicExpensesDviceConfigDTO);

	/**
	 * 是否发能够发送短信或拨打电话
	 * @param device
	 * @param sendType  10短信，20电话
	 * @return
	 */
	boolean sendSmsOrTts(BasicDeviceEntity device, int sendType);

	boolean deviceDeductSms(Long deviceId,int smsAddNum, Long deptId, BasicNotificationRecordEntity basicNotificationRecordEntity);

	boolean deviceDeductTts(Long deviceId,int ttsAddNum, Long deptId, BasicNotificationRecordEntity basicNotificationRecordEntity);

	boolean deviceSms(Long deviceId,int smsAddNum, Long deptId);

	boolean deviceTts(Long deviceId,int ttsAddNum, Long deptId);

	BasicExpensesDviceConfigVO selectDeviceRemain(List<BasicExpensesDviceConfigEntity> deptDetails);

}